﻿using System;
using System.Collections.Generic;

namespace NeuralLib
{
    [Serializable]
    public class KohonenNetwork
    {
        protected int _inputsCount;

        private KohonenMapLayer _kmLayer;

        public KohonenNetwork(IKohonenMetricFunction function, int inputsCount, int MapXSize, int MapYSize)
        {
            _inputsCount = inputsCount;

            _kmLayer = new KohonenMapLayer(MapXSize, MapYSize, inputsCount, function);
        }
        public int InputsCount
        {
            get
            {
                return _inputsCount;
            }
        }
        public KohonenMapLayer KmLayer
        {
            get { return _kmLayer; }
        }

        public string[] Serialize()
        {
            var result = new List<string>();
            for (var i = 0; i < KmLayer.NeuronsCount; i++)
                result.Add(KmLayer.Neurons[i].Serialize());
            return result.ToArray();
        }


    }
}